package com.unknowpupil.utils;

import org.joda.time.DateTime;

import java.util.Date;

/**
 * Created at 2020/11/4 by w10g <br>
 * Initialize DateUtils ... <br>
 *
 * @author unknowpupil
 * @since 0.0.1
 */
public class DateUtils {
    public static final String STANDARD_FORMAT = "yyyy-MM-dd HH:mm:ss";

    public static String dateToStr(Date date) {
        if (date == null) {
            return "";
        }
        DateTime dateTime = new DateTime(date);
        return dateTime.toString(STANDARD_FORMAT);

    }
}
